//------------------------------------------------------------------------
AdvDlg::AdvDlg(QWidget* parent,
bool &synthShortNames,
- bool &enableCharSetXform,
bool &previewGmap,
int &debugLevel):
QDialog(parent),
synthShortNames_(synthShortNames),
- enableCharSetXform_(enableCharSetXform),
previewGmap_(previewGmap),
debugLevel_(debugLevel)
{
ui_.setupUi(this);
ui_.synthShortNames->setChecked(synthShortNames);
- ui_.enableCharSetXform->setChecked(enableCharSetXform);
ui_.previewGmap->setChecked(previewGmap);
ui_.debugCombo->setCurrentIndex(debugLevel+1);
ui_.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon(":images/ok"));
void AdvDlg::acceptClicked()
{
synthShortNames_ = ui_.synthShortNames->isChecked();
- enableCharSetXform_ = ui_.enableCharSetXform->isChecked();
previewGmap_ = ui_.previewGmap->isChecked();
debugLevel_ = ui_.debugCombo->currentIndex()-1;
accept();
//------------------------------------------------------------------------
void MainWindow::checkCharSetCombos()
{
- ui_.inputCharSetCombo->setEnabled(babelData_.enableCharSetXform_);
- ui_.outputCharSetCombo->setEnabled(babelData_.enableCharSetXform_);
- ui_.inputCharSetCombo->setVisible(babelData_.enableCharSetXform_);
- ui_.outputCharSetCombo->setVisible(babelData_.enableCharSetXform_);
}
//------------------------------------------------------------------------
void MainWindow::inputFileOptBtnClicked()
if (babelData_.debugLevel_ >=0) args << QString("-D%1").arg(babelData_.debugLevel_);
if (babelData_.synthShortNames_) args << "-s";
- // Input char set if specified
- if (babelData_.enableCharSetXform_ && babelData_.inputCharSet_ != QString())
- args << "-c" << babelData_.inputCharSet_;
-
Format ifmt = formatList_[currentComboFormatIndex(ui_.inputFormatCombo)];
Format ofmt = formatList_[currentComboFormatIndex(ui_.outputFormatCombo)];
// --- Filters!
args << filterData_.getAllFilterStrings();
- // Output char set if specified
- if (babelData_.enableCharSetXform_ && babelData_.outputCharSet_ != QString())
- args << "-c" << babelData_.outputCharSet_;
-
// Output type, with options
if (babelData_.outputType_ != BabelData::noType_) {
bool outIsFile = (babelData_.outputType_ == BabelData::fileType_);
void MainWindow::moreOptionButtonClicked()
{
AdvDlg advDlg(0, babelData_.synthShortNames_,
- babelData_.enableCharSetXform_, babelData_.previewGmap_, babelData_.debugLevel_);
+ babelData_.previewGmap_, babelData_.debugLevel_);
connect(advDlg.formatButton(), SIGNAL(clicked()),
this, SLOT(resetFormatDefaults()));
advDlg.exec();